/** @file PhysicsController.h
    @class PhysicsController
    @brief Class that connects that physics world and the game world

    The physics controller is a middle-hand between the physics world and the game world. It updates positions of the visual objects to match their physics representation.
*/
#include "stdafx.h"

#ifndef _PhysicsController_h_
#define _PhysicsController_h_

#include "Controller.h"
#include "PhysicsComponent.h"

class PhysicsController : public Controller {
public:
	/**
	 *	@brief Constructor
	 *	@param model The model for the game engine. Needed to get the game objects that should be updated.
	 */
	PhysicsController(Model* model);

	/**
	 *	@brief Destructor
	 */
	~PhysicsController();

	/**
	 *	@brief Called in the update-loop. Synchronizes the positions between visual game object and its physics representation.
	 *	@param deltaTime The number of seconds (float) since last update.
	 */
	virtual bool update(float deltaTime);

private:
	/**
	 *	@brief The map with all the game objects in the game.
	 */
	std::map<unsigned int, GameObject*> *m_goMap;
};

#endif //_PhysicsController_h_